<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html>
<html>
<head>
    <jsp:include page="/WEB-INF/jsp/include/head.jsp"/>
    <style>
        .detailTable {
            margin-bottom: 0px;
        }
        .detailTable th {
            width: 26%;
        }
        .detailTable td {
            width: 37%;
        }
    </style>
</head>
<body>
<ol class="breadcrumb">
    <li><strong>当前位置： </strong>信息中心</li>
    <li class="active">系统信息</li>
</ol>



<table id="table_data"></table>


<div class="modal fade" id="modal_ajax">
    <div class="modal-dialog    modal-lg ">
        <div class="modal-content ">
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->


<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>


<script>
    var entityName = {
        "EMS_EXPERT_BASE": "基本信息",
        "EMS_EXPERT_COMPANY": "工作单位",
        "EMS_EXPERT_CERTIFICATE": "资质证书",
        "EMS_EXPERT_MAJOR": "从事专业",
        "EMS_EXPERT_WORK": "工作经历",
        "EMS_EXPERT_TRAIN": "培训经历",
        "EMS_EXPERT_EDUCATION": "教育经历",
        "EMS_EXPERT_REVIEW": "审查/评审经历"
    };

    var $table_data = $('#table_data');

    $table_data.bootstrapTable({
        url: 'expertInfo/expertSeeCheckResult/select',
        striped: true,
        cache: false,
        sidePagination: 'server',
        pageSize: 10,
        pageList: [10, 30, 50, 100, 300],
        pageNumber: 1,
        pagination: true,
        queryParams: function (params) {
            return params
        },
        columns: [

            {
                formatter: function (value, row, index) {
                    return [
                        index + 1
                    ].join('');
                }
            },
            {
                title: '审核时间',
                field: "verifier1OperateDate",
                formatter: function (value, row, index) {
                    return $.Helper.dataTimeHelper.int2DateTimeString(value);
                }
            },
            {
                field: 'operateType',
                title: '操作类型',
                formatter: function (value, row, index) {
                   return $.sysPlugin.ifElse(value, $.sysPlugin.enumeration.operationType);
                }
            },
            {
                field: 'tableName',
                title: '详细信息',
                events: 'operateEvents',
                formatter: function (value, row, index) {
                    var s = $.sysPlugin.ifElse(value, entityName);
                    return [
                        '<a class="tableNameClick" href="javascript:;" >' + s + '</a>'
                    ].join('');
                }
            }, {
                field: 'operateReason',
                title: '审核意见'
            },

            {
                field: 'workFlowStop',
                title: '审核结果',
                formatter: function (value, row, index) {
                    var s= '<button type="button"  class="btn btn-xs btn-default btn-success  ">成 功</button>';
                    if (value==1){
                         s=   '<button type="button"  class="btn btn-xs btn-default btn-danger">失 败</button>'
                    }
                    return [s].join('');
                }
            }
        ]
    });



    window.operateEvents = {
        'click .tableNameClick': function (e, value, row, index) {
            $('#modal_ajax').modal({
                backdrop: 'static',
                keyboard: false,
                show: true,
                remote: 'expertInfo/checkExpertInfoDlg/showDetail?id=' + row.id
            });
        }
    };
    $.sysPlugin.clearModalRemoveData("modal_ajax");
    $.sysPlugin.initSimpleSelect2();
</script>
</body>
</html>
